<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML><HEAD><TITLE>photosight.com</TITLE>
<META http-equiv=Content-Type content=text/html;charset=utf-8>
<script type="text/javascript" src="js/swfobject.js"></script>
<link href="/css/header.css" type="text/css" rel="stylesheet">
<link href="/css/popup.css" type="text/css" rel="stylesheet">
<META content="MSHTML 6.00.6001.18183" name=GENERATOR></HEAD>
<BODY>
<?php require_once("/var/www/vhosts/justatestforip.com/httpdocs/tmpl/header.php"); ?>
<div id="bg_wrap">
<div id="img_wrap">
<?php
if(isset($_GET['photo']))
{$photoID = $_GET['photo'];}
else
{$photoID = 0;}

$DB->query("SELECT t_users.userID as 'authorID', t_users.nikname, t_categories.name as 'categoryName', t_photos.name as 'photoName', t_photos.views, t_photos.description, t_photos.equipment, t_photos.voting, t_photos.commenting, t_photos.height, t_photos.width, t_photos.v_x+t_photos.v_o+t_photos.v_t as 'votes', t_photos.v_n, t_photos.dateCreate, DATE_FORMAT(t_photos.dateCreate,'%Y/%m/%d') as 'path' FROM t_photos Inner Join t_categories ON t_photos.categoryID = t_categories.categoryID Inner Join t_users ON t_photos.userID = t_users.userID where photoID=".$photoID);
if($DB->next_record())
{
	$authorID = $DB->f('authorID');
	$photoName =	$DB->f('photoName');
	$userNickname = $DB->f('nikname');
	$categoryName = $DB->f('categoryName');
	$views = $DB->f('views');
	$description = $DB->f('description');
	$voting = $DB->f('voting');
	$commenting = $DB->f('commenting');
	$height = $DB->f('height');
	$width = $DB->f('width');
	$votes = $DB->f('votes');
	$dateCreate = $DB->f('dateCreate');
	$path = $DB->f('path');
}
else
{$authorID = 0; $photoName =	""; $userNickname = "";	$categoryName = "";	$views = "";	$description = "";	$voting = "";	$commenting = "";	$height = "";	$width = "";	$vote = "";	$dateCreate = ""; $path ="";}
?>


	<DIV style="clear:both;"></div><div id="locator_menu"><A class="white" href="#"><img src="/img/icons/home-icon.gif"  border=0 galleryimg="no" alt="home"></a><A class="next" href="#">Photos</a><A class="next" href="#">Categories</a><A class="next" href="#"><?php echo $categoryName; ?></a><span><?php echo $photoName; ?></span></div>
	<img src="http://images.photosight.com/<?php echo $path.'/'.$photoID.'.jpg'; ?>"  border=0 galleryimg="no" alt="<?php echo $photoName; ?>"></div>
<div class="img_tools">
<a href="#" onClick="expandingWindow('/viewpicwindow.php?photoid=1592367');return false;"><img src="/img/icons/i_view.gif" width=16 height=16 border=0 vspace=5 alt="view in full screen"></a><img style="cursor:hand" id="cropperimg" onClick="flipCrop();return false;" src="/img/icons/i_crop.gif" width=16 height=16 border=0 vspace=5 hspace=5 alt="tool | crop"><img style="cursor:hand" id="gridimg" onClick="flipGrid();return false;" src="/img/icons/i_grid.gif" width=16 height=16 border=0 vspace=5 alt="tool | golden grid"><img style="cursor:hand" id="bw" onClick="flipBW();return false;" src="/img/icons/i_bw.gif" width=16 height=16 border=0 vspace=5 hspace=5 alt="tool | remove color"><br><br><br><br>
<div id="flashcontent">thumbnails would be here if you install flash player</div>
	<script type="text/javascript">
		var so = new SWFObject("flashwidget/thumbs.swf", "thumbs", "1000", "200", "8", "#F8F8F8");
		//so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
		so.write("flashcontent");
	</script>
</div>
</div>
<div id="wrap_ps">
 <div id="column_right">
 <div id="content">   
<?php
/*---------------------comments start------------------------------------------- */  
/// insert new comments ///	
if(isset($_POST['commentForm']))
{
	$ip=$_SERVER['REMOTE_ADDR']; 
	if($_POST['replyID']>0)
	{$replyID = $_POST['replyID'];}
	else
	{$replyID ="DEFAULT";}
	$comment = trim($_POST['comment'],' ');

	$DB->query("insert into t_comments (photoID,userID,replyID,comment,ip) values (".$photoID.",".$userID.",".$replyID.",'".$comment."','".$ip."')");
}
///  end insert new comments ///

require_once("/var/www/vhosts/justatestforip.com/httpdocs/classes/Library.php");
$Library = new Library();
$comments  = $Library->bildComments($photoID,$authorID,$userID,$DB);
$comentsTotal = $Library->totalComments;

?>

<h3 class="folder">Comments [<?php echo $comentsTotal; ?>]</h3>
<div id="block_comments">
<?php 
echo $comments;
if($userID>0)
{
	?>
	<script type="text/javascript">
	function comReply(id)
	{
	document.getElementById('commentReply').innerHTML = '<label for="target">reply to </label>'+document.getElementById('com'+id).innerHTML;
	document.getElementById('hidenReplyID').value = id;
	document.getElementById('comment').focus();
	}
	</script>
	
	<H3 class="folder" id=comment_add_form_title>Write a comment</H3>
	<DIV class=hidden id=comment_preview></DIV>
	<form class="comment_form" method="post">
	<DIV class=information>
	<P>Please, read the <A 
	href="#">ruls</A> before you post a comment.<BR>
	Being rude is not acceptable on the Photo.Sight, if you don't like a photo press the "Do not like" button in the rating section.<BR>
	<STRONG>Attention!</STRONG><BR>
	<UL>
	  <LI>You can post a comment every 60 seconds 
	  <LI>You can delete your comment in first 5 minutes </LI></UL>
	<P></P></DIV>
	<div id="commentReply" class="field"></div>
	<div class="field">
	<label for="comment">Comment</label>
	<textarea id="comment" style="width: 77%;" cols="40" rows="5" name="comment"></textarea>
	</div>
	<DIV class=field><SPAN class=fake></SPAN>
	<DIV class=checkboxes><LABEL 
	onclick="#" 
	for=subscribed_for_photo_checkbox><INPUT id=subscribed_for_photo_checkbox 
	type=checkbox> <SPAN>I would like to get new comments via email.</SPAN> </LABEL>
	</DIV></DIV>
	<input id="hidenReplyID" type="hidden" value="0" name="replyID"/>
	<div id="form_buttons" class="form_buttons">
	<input class="button" type="submit" name="commentForm" value="&nbsp;Post&nbsp;a&nbsp;comment&nbsp;"/>
	</div>
	</form>
	<?php 
}
/// end add comments form ///
/*---------------------comments end------------------------------------------- */  
?>
<DIV style="clear:both;"></div>
</div>
</div>
    </div>
    <div id="column_left">
    <div id="block_left">
    	<div id="vote1"><A href="#"><img src="/img/clear.gif" width="55" height="115" border="0"  alt="please vote"></a><br>0</div>
     	<div id="vote2"><img src="/img/clear.gif" width="55" height="115" border="0"  alt="please vote"><br>0</div>
     	<div id="vote3"><img src="/img/clear.gif" width="55" height="115" border="0"  alt="please vote"><br>0</div>
     	<div id="vote4"><img src="/img/clear.gif" width="55" height="115" border="0"  alt="please vote"><br>0</div>
      <DIV style="clear:both;"></div>
    </div>
    <div id="left_message">You have to login to vote</div>
    	<h3>Information</h3>
      <DL class=submenu>
        <DT> photo name 
        <DD>
        <UL>
        	<LI><span class="red">Author :</span><?php echo $userNickname; ?></LI>
          <LI><span class="red">Posted :</span><?php echo $dateCreate; ?></LI>
          <LI><span class="red">Description :</span><?php echo $description; ?></LI>
          <LI><span class="red">Categorie :</span><?php echo $categoryName; ?></LI>
          <LI><span class="red">Favorite :</span> 0</LI>
          <LI><span class="red">Viewed :</span><?php echo $views; ?></LI>
          <LI><span class="red">Votes :</span><?php echo $votes; ?></LI>
          <LI><span class="red">Awards :</span>xxx</LI>
         </UL>
        </DD>
       </DL>
       
           	<h3>ad</h3>
a banner
    </div>

</div>
<DIV style="clear:both;"></div>
<?php require_once("/var/www/vhosts/justatestforip.com/httpdocs/tmpl/footer.php"); ?>
</BODY></HTML>



